

create external table jms_ods.tab_rou_competitor_effective (
 sender_province        string     comment "始发省份"    --NVARCHAR2(60),
,sender_province_id     string     comment "始发省份ID"    --NVARCHAR2(20),
,sender_city            string     comment "始发城市"    --NVARCHAR2(60),
,sender_city_id         string     comment "始发城市编码"    --NVARCHAR2(20),
,receiver_province      string     comment "目的省份"    --NVARCHAR2(60),
,receiver_province_id   string     comment "目的省份ID"    --NVARCHAR2(20),
,receiver_city          string     comment "目的城市"    --NVARCHAR2(60),
,receiver_city_id       string     comment "目的城市编码"    --NVARCHAR2(20),
,times                  int        comment "时效天数"    --NUMBER(3),
,platform               string     comment "所属平台"    --NVARCHAR2(20),
,platform_code          string     comment "所属平台编码"    --NVARCHAR2(20),
,create_time            timestamp  comment "创建时间"    --DATE
,modify_time            timestamp  comment "最后更新时间"    --DATE
,create_by              string     comment "创建人"    --NVARCHAR2(20),
,create_by_id           string     comment "创建人ID"    --NVARCHAR2(20),
,id                     string     comment "主键ID"    --NVARCHAR2(40)
)
comment "同行时效表,非BI表"
partitioned by(dt string comment '分区字段:数据录入日期')
stored as parquet
location "/dw/hive/jms_ods.db/external/tab_rou_competitor_effective"